import static org.junit.Assert.*;

import java.math.BigDecimal;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;


public class DebitCardTest {

	DebitCard testCard;
	
	@Before
	public void setUp() throws Exception {
		Customer testCustomer = new Customer("test first name", "test last name", "1234 test street", "test town olympia", "test zipcode 12345", "test country usa");
		CheckingAccount testAccount = new CheckingAccount(testCustomer);
		testCard = new DebitCard(testCustomer, testAccount);
		testAccount.deposit(new BigDecimal("100"));
	}

	@After
	public void tearDown() throws Exception {
		testCard = null;
	}
	
	@Test
	public void testPay() {
		assertTrue(testCard.useDebit(new BigDecimal("10.00")));
	}

}
